PIC micro-controller based synchronization of two fractional order jerk systems

The paper studies a 3D Chaotic Jerk oscillator with fractional derivatives. An approach is proposed to implement it on a PIC16F877A microcontroller in order to reduce the requirements for multiple analogue electronic components such as resistors, capacitors, coils, multipliers, operational amplifiers, which are very bulky and consume a lot of power. The behaviours of the underlying system are analysed analytically, numerically and experimentally. It comes from this analysis that the fractional model exhibits chaotic dynamics when for parameters for which the equivalent integer derivative system exhibits limit-cycles. The synchronization under two closed initial conditions is also studied, highlighting one of the most common applications of the chaos concept.

Concept of fractional calculus has become undoubtdly a subjet of active research field in nonliear science, due to its potential applications in electronics 1 , mechanics 2 , nuclear physics 3 , medicine 4 , financial systems 5 . Likewise, chaos has been also widely reported over the past century years [6][7][8][9][10][11][12][13] . It is well-known that chaotic systems have a very high degree of sensitivity to initial conditions and their evolution through phase space that appears unpredictable.
In fact, in 1963, Lorenz emphasized that a chaotic system solved with two very close initial conditions could have two completely different dynamics 14 . More recently, some electronic circuits exhibiting chaotic behavior are proposed in literature [15][16][17] . Furthermore, those implementing fractional order circuit have been also reported. For example, the fractional Chen circuit 18,19 , the fractional Chua circuit 20 and the fractional Rössler circuit 21 . For a better review one can read 22-24 . In truth, fractional dynamical systems are developed with the main idea of introducing the memory effect in the dynamics of the system. It is then observed that these systems present hidden attractors that the conventional approach does not exhibit 25 . Considering this particular advantage, it is therefore imperative to design fractional electronic circuits able to reproduce the desired behavior. To do this, an ordinary capacitor is replaced by a fractional capacitor whose impedance value must be determined. In this case, the Laplace transform of the differential operator 1 s is replaced by 1 s m , where 0 < m < 1 is the derivative order [26][27][28][29][30][31] . However, to the best of our knowledge, it is arduous to determine the exact value of a fractional capacitor which corresponds exactly to his fractional derivative operator. Several techniques have been suggested to address this problem such as the Regular Newton's Process 32 and the Halley's Iterative Method 33 . These methods were used to design the fractional circuits mentioned above using analogue component. From these circuits it can be seen that the analogue component approach requires very large capacitors and resistors which are difficult to find on the market. Furthermore, using large capacitors and large resistors means operating at high frequency 34 . We propose a numerical approach for the real implementation of a fractional system on a micro-controller based on Euler's resolution method and applied to the synchronization of a Jerk system, which has never been done to our knowledge.
Jerk systems have important considerations for many applications in science and mechanical engineering. In 35 , it is noted that Jerk systems could exhibit several physical phenomena such as multi-stability, chaos or hyperchaos. They could be used for synchronization 36 and encryption 37 of chaotic systems.
In this paper, we propose an optimised algorithm to implement the fractional chaotic system in the numerical domain that is easy to prototype. The Jerk equation given in Refs. [38][39][40]42 allow to achieve this. It will be useful to study the contribution of the fractional derivative on the dynamics of the system particularly if the implementation of the fractional system on a PIC-microcontroller allows to obtain hidden attractors contrary to the classical model considering the same parameters. www.nature.com/scientificreports/ The paper is organised as follows: In the following section, we propose the description of the Jerk system followed by an analytical study. We explain the numerical methods dedicated to the computation of fractional integrals, we also present the method used for the implementation of the system on a micro-controller; "Results and discussions" is dedicated to the results and discussion; the paper ends with a conclusion and announces some perspectives for our future work.

Mathematical models
Background. In mechanics, a shake is a random change in the vector of acceleration without shock. In physics, the shock vector, more commonly called the jerk, is the acceleration vector's derivative over time. Jerk systems are then the third-order differential equations of the form d 3 x dt 3 = F(x) , which translates the variation of the acceleration in the system. It is the simplest of three-dimensional chaotic systems, where F(x) is the nonlinear function that describes the third-time derivative of displacement variable x. In this work, the Jerk system used will be the one presented in the Eq. (1) 40 .
α and β could be subsequently defined as control parameters. This equation (1) can be transformed into the following system.
To solve it numerically, one use the Euler algorithm. In fact, the Euler algorithm has only one step, and it is easy to implement because it requires fewer mathematical operations 41 . The Euler algorithm is described for Eq. (1) by: Physically, (x, y, z) respectively represents the position, the velocity and the acceleration (Eq. 1) could be dissipative if β > 0 . On can therefore highlight three equilibrium points, so The Jacobian matrix of (Eq. 1) is given by We come out two characteristics equations relating to J 0 , J 1 and J 2 The literature shows that the Routh-Hurwitz criterion contains the necessary and sufficient conditions for the system stability. Thus, without even solving the characteristic equation, one finds that the system is stable for β > 0 whatever the chosen equation.
Route to chaos. It is shown in Refs. [42][43][44][45][46][47] that the nature of the chaotic dynamic system, in addition to being sensitive to initial conditions, is closely linked to another parameter which is called the control parameter. In our case, this is the β parameter. Thus, the system will behave chaotic depending on this parameter.
We report in Fig. 1a the bifurcation diagram of the system. The diagram shows a high concentration of points corresponding to the system dynamics change for 0.33 < β < 0.363 and 0.371 < β < 0.378 . Over these intervals, the system changes periodically and it is therefore difficult to observe chaotic dynamics. In Fig. 1b, the lyapunov exponents are plotted against β . Indeed, Lyapunov exponents obtained using Wolf 's algorithm are another tool used to decipher the nature of a dynamical system [48][49][50][51][52][53] . Therefore, presence of positive Lyapunov exponents ( 1 ) is sufficient to establish that the considered system is able to exhibit chaotic dynamics. Moreover, the Lyapunov Exponents considered against the variation of the system's control parameter show a large superposition with the bifurcation diagram as illustrated in the Fractional model. There are several definitions of the fractional order derivative in the literature, but the fractional Caputo and Riemann-Liouville (R-L) operators are the most commonly used in different areas of fractional dynamical systems. The main advantage of the fractional Caputo derivative over the fractional R-L derivative is that the initial conditions of fractional differential equations with Caputo derivatives are the same as those of the integer order for differential equations 53 . Therefore, in this paper we will use the initial conditions (x 0 , y 0 , z 0 ) = (0, 1, 0) to solve the integer derivative and fractional derivative system. Fractional calculus is a generalization of integration and differentiation to noninteger-order fundamental operator aD q t f (t) 53 , where a (2) for n − 1 < q < n , Ŵ(.) is Euler's Gamma function.
Thus, system (Eq. 1) can be rewritten as (Eq. 8) to obtain the fractional Jerk system.

Numerical methods for calculation of fractional integrals. Hoda et al. have shown that by using
Euler's method, it is possible to find numerical solutions of linear and nonlinear systems of fractional differential equations. To prove this, they consider fractional derivatives as defined by Caputo. Furthermore, they show that Euler's algorithm is very simple to implement and provides directly the solutions without linearization. Some examples illustrating numerical comparisons between the Euler algorithm and the classical algorithm are presented in Ref. 41 to find the solution to a given dynamical system. Let us consider the following problem: D q y(t) = f (t, y(t)), y(0) = y 0 , 0 < q < 1, t > 0 . To solve it in the interval [0, a], it is necessary to construct a set of points (t j , y(t)), y(0) = y 0 which are considered as approximate values of the solution. In order to perform this approximation, the interval [0, a] is divided into n sub-intervals [t j , t j+1 ] , each having an equal width. So, the general formula of the fractional Euler method is the following.
Observe that y(t) is an implicit system variable, the trapezoidal method is used to find it 55,56 . This method which consists in solving the system in two steps is called the prediction-correction approach that we use for and we obtain the following systems.

Results and discussions
In this section, the methodology developed in the previous section is applied on the Jerk system to observe the impact of the fractional order on the resolution result. Although the implementation is independent of the discussion, we visualise here at the same time the theoretical synchronisation analyse under Matlab and experimental under micro-controller in order to compare them.
Numerical analysis. We implemented Eqs. (12) and (13) under the Matlab software, and one observed the attractors that we present in Fig. 2. On this figure, we have several main remarks to draw. From first view, the bifurcation diagram presented in the Fig. 1 shows that the system presents a periodic dynamics for β = 0.4 and a chaotic dynamics for β = 0.35 . Under the assumption q 1 = q 2 = q 3 = 1 , we observe for the two values of β mentioned, a figure of periodic dynamics, Fig. 3a and a figure of chaotic dynamics, Fig. 2b respectively. This setting ( q 1 = q 2 = q 3 = 1 ) is the equivalent of the classical resolute system. To prove the impact of the fractional order on the problem solution, let us consider the value of β for which periodic dynamics are observed ( β = 0.4 ) and let us varies the fractional orders. In this way, taking (q 1 , q 2 , q 3 ) = (0.94, 0.98, 0.95) , Fig. 2c shows a double periodic dynamics. Still with ( β = 0.40 ) and considering (q 1 , q 2 , q 3 ) = (0.98, 1, 1) , one observes chaotic dynamics now (Fig. 2d), which was not observed for the classical case by considering ( q 1 = q 2 = q 3 = 1 ), hence the interest of the fractional approach. Fig. 2b is a distinctive sign that the fractional system has a chaotic behaviour, but it would be interesting to carry out investigations to quantify this chaotic behaviour. To do this, we use the Lyapunov exponent applied to time series 60 . Indeed, the fraction system does not return the easy task to calculate the system's Jacobian matrix. Thus, we consider a state vector of the system and we reconstruct the phase space. This method allows us to calculate the largest Lyapunov exponent, which gives us LLE = 1.43 > 0, and shows that the system is also chaotic in fractional model. The influence of the fractional order on the system can thus be represented in a general way. For this purpose, we present in Fig. 3a the bifurcation diagram and in Fig. 3b the spectrum showing the evolution of the largest lyapunov exponent according to the fractional order q. The superposition observed between these two figures shows that the system dynamics is indeed influenced by the fractional order q.

Largest lyapunov exponent in the fractional model. Attractor presented in
Micro-controller implementation. The Jerk system generates real continuous values, which are not understandable by the micro-controller. In order to solve this problem, we proposed here a shift of reference frame, which allows to switch from the analogue to the digital domain. Therefore, to digitise the analogue vector x, it is necessary to know the minimum and maximum values of x, the minimum and maximum reference values of the micro-controller. This implies knowledge of the precise number of bits on which to encode the converted values. Subsequently, a linear approximation line X(x) = ax + b is defined, allowing to leave the interval [x min , x max ] to [X min , X max ] . Here, X min = 0 , X max = (2 n − 1) and the number of bits is n = 8 . So a = (2 n −1) x max −x min and b = (2 n − 1)x min . In PICF877A micro-controller, system (3) is implemented via the Microchip XC8 compiler, the x(k) and y(k) variables was directed to the PORTB and PORTD and converted to an analogue voltage by the R-2R DAC as depicted on Fig. 4.

Why a micro-controller implementation? A Fractional
Capacitor is a combination of several classical capacitors and resistors. Depending on the design method chosen, the number of resistors and capacitors used is large 58 . As a result, a large amount of energy is consumed. We avoid the space requirement of the device because, for an analog implementation of a third order system, three fractional capacitors need to be designed. To confirm the simplicity of a PIC implementation, observe (Fig. 5b). One notices that the experimental device contains only four main elements. There are two digital-to-analog converters (A and B), a micro-controller (C)  Fractional order influences. As the numerical values, we assume the same control parameter values in agreement with the bifurcation diagram. By considering the classical case ( q 1 = q 2 = q 3 = 1 ) with β = 0.35 , one observes a periodic dynamics, see Fig. 6a and a chaotic dynamics, see Fig. 6b respectively which are the similar attractors to those obtained under Matlab, see Fig. 3a,b ) . To prove the impact of the fractional order on the experimental solution of the problem, we proceed as in numerical simulation, i.e. by considering the value of β for which a periodic dynamics is observed ( β = 0.4 ) and we vary the fractional orders. Thus, taking (q 1 , q 2 , q 3 ) = (0.94, 0.98, 0.95) , the Fig. 6c shows a double periodic dynamics. Still with ( β = 0.40 ) and considering (q 1 , q 2 , q 3 ) = (0.98, 1, 1) , one observes a chaotic dynamics (Fig. 6d), which was not observed for the classical case considering ( q 1 = q 2 = q 3 = 1 ). The same behaviour was observed in numerical simulation under Matlab (see Fig. 6c,d), which shows that the system implemented under micro-controller is successful.
Synchronization results. Chaos synchronization consists of oscillating two chaotic systems in a synchronized manner. So, one recognize weaker forms of synchronization, when some key characteristics of the dynamical behavior are identical, such as frequencies or amplitude. Hence, in this section, we discuss the synchronization of two fractional chaotic systems. To do this, we consider here two chaotic systems called respectively master (m) and slave (s). According to the Adaptive control method 59 , we derive the following equations:  www.nature.com/scientificreports/ wherein u 1 , u 2 and u 3 are active non-linear controls that have been added to the chaotic chaotic system (Eq. 14) to implement the synchronisation. Considering the synchronization errors as e 1 = x s − x m , e 2 = y s − y m , e 3 = z s − z m , we derive (Eq. 16).
Equations (14) and (15) are solved using the predictor-corrector method described in "Results and discussions". It appears that, master and slave systems trajectories converge after few milliseconds as depicted on Fig. 7 where e 1 and e 2 are synchronisation error, x m is synchronized with x s . Figure 7a,b are the results obtained under Matlab, Fig. 7c,d are the synchronization results obtained experimentally. Master

Conclusion
In this paper, we have proposed Pic micro-controller modelling a Jerk equation in integer and fractional order domains and phase portraits were investigated numerically and experimentally. Analytic studies, Lyapunov exponents and bifurcation analysis showed that the system has three determined equilibrium points and also displays complex self-excited non-linear dynamics. It appeared from simulations and experimentations that, the fractional model of the designed circuit allows to obtain masked attractors contrarily to the classical model considering the same parameters. A study case of synchronization to overcome the extreme sensitivity of the initial conditions was investigated. As a future outcome will be the exploration under a digital development board such as the FPGA.

Data availability
The data that support the findings of this study are available from the corresponding author upon reasonable request.